FT8TransmitSignal: instrument TX output path with fileLog#87
Merged
Conversation
The car-dash TX-abort symptom (PTT keys → 250-300ms → PTT releases, no audio sent) is still happening despite #84 shipping the libusb nativeWrite. But the full TX output path is logged only to logcat, so from debug.log there's no way to tell: 1. Which output branch ran (USB direct vs. AudioTrack). 2. If USB direct ran, which step failed before reaching writeAudio (device lookup, USB permission, open, hasOutput, activateOutput). Same instrumentation pattern as the input side that surfaced the real bugs in #82 / #83. Changes: - playFT8Signal: log the branch decision with audioOutputDeviceId and the saved USB output VID:PID. Log which branch was taken. - playViaUsbAudio: fileLog at each failure point and at the success pivots (device opened + output activated, before writeAudio, writeAudio return value). Every failure path has a distinct message so the failure point is obvious from one log line. After the next car-dash repro we'll know whether the abort is: - audioOutputDeviceId not being -1 at TX time (picker reset?), - device lookup failing (UsbManager state), - permission lost on re-attach, - activateOutput failing on the car-dash kernel, - or actually reaching writeAudio and libusb dying inside. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Same Phase-0 logging pattern as the input side that surfaced the real bugs in #82 / #83 — applied to the TX output side because the car-dash TX-abort symptom is still happening despite #84 shipping the libusb
nativeWrite.The relevant clue from the latest car-dash log (debug (3).log):
…with zero mention of
playFT8Signal/playViaUsbAudio/trying libusb native write/nativeWriteanywhere in the log. Something is aborting TX before our libusb code is reached, and fromdebug.logwe can't tell what.The whole TX output path (
FT8TransmitSignal.playFT8SignalandplayViaUsbAudio) logs only to logcat. This PR makes it writefileLog()at the branch decision and at each failure point.What gets logged
playFT8Signal(the branch point):playViaUsbAudio(each step):After the next car-dash repro we'll know in one read whether the abort is:
audioOutputDeviceIdnot being -1 at TX time (picker reset?)activateOutputfailing on the car-dash kernelwriteAudioand libusb dying inside (the casenativeWritealready logs)Test plan
assembleDebugcompiles clean (APK built fresh).debug.log, identify the single ABORT line that explains the 262ms PTT release. We then know which next fix to ship.🤖 Generated with Claude Code